//
//  PurchaseHistoryModel.swift
//  Exam-iOS
//
//  Created by 李胜锋 on 2018/3/23.
//  Copyright © 2018年 李胜锋. All rights reserved.
//

import Foundation
import ObjectMapper

class PurchaseHistoryModel: Mappable {
    
    enum PurchaseStatus: Int {
        ///未支付
        case nonPurchase = 1
        ///支付成功
        case purchased
        ///支付失败
        case failed
    }
    var cost: Int?
    var createdAt: String?
    var productName: String?
    var status: PurchaseStatus?
    
    required init?(map: Map) { }
    func mapping(map: Map) {
        cost <- map["cost"]
        createdAt <- map["createdAt"]
        productName <- map["productName"]
        status <- map["status"]
    }
}
